/* 公共区域 */
*{
    margin: 0;
    padding: 0;
}

body{
    background-color: #f3f5f7;
}

li{
    list-style: none;
}

a{
    text-decoration: none;
}

 /* 清除浮动 */
 .clearfix:before,
 .clearfix:after {
     content: "";
     display: table;
 }

 .clearfix:after{
   clear:both;
 }

 .clearfix{
   *zoom:1;
 }

.w{
    width: 1200px;
    margin: auto;
}

/* header区域 */
.header{
    height: 42px;
    /* 此地方会覆盖(层叠).w里面的margin,所以左右写auto */
    margin: 30px auto;
}

.logo{
    float: left;
    width: 198px;
    height: 42px;
}

.nav{
    float: left;
    margin-left: 60px;
}

.nav ul li{
    float: left;
    margin:0 15px;
}

.nav ul li a{
    display: block;
    height: 42px;
    line-height: 42px;
    padding: 0 10px;
    font-size: 18px;
    color: #050505;
}

.nav ul li a:hover{
    border-bottom:2px solid #00a4ff;
    color: #00a4ff;
}

.search {
    float: left;
    width: 412px;
    height: 42px;
    margin-left: 70px;
}

.search input {
    /* 因为input和button都是行内块元素,在同一行显示时中间会有缝隙(文本框+按钮实测5px缝隙),所以这里(宽345+边框1+内边距15)=361+(button50)=411,
       search总宽为412,有缝隙按钮就掉下去换了一行,这里可以给两个表单都加上浮动,让其没有缝隙,就会在同一行上了*/
    float: left;
    width: 345px;
    height: 40px;
    border:1px solid #00a4ff;
    border-right: 0;
    /* 去除文本框获得焦点显示边框 */
    outline: none;
    font-size: 14px;
    color: #bfbfbf;
    padding-left: 15px;
}

.search button {
    float: left;
    width: 50px;
    height: 42px;
    /* 按钮button默认有个边框,需要我们手动去掉 */
    border: 0;
    background:url(../images/btn.png);
}

.user {
    float: right;
    height: 42px;
    line-height: 42px;
    margin-right: 30px;
}

/* 行内块元素(这里是图片)和文字垂直居中 */
.user img{
    vertical-align: middle;
}

.user span{
    color: #666;
    font-size: 14px;
}

/* banner区域 */
.banner{
    height: 421px;
    background-color: #1c036c;
}

/* .banner下的.w设置样式 */
.banner .w{
    height: 421px;
    background:url(../images/banner2.png) no-repeat top center;
}

.subnav{
    float: left;
    width: 190px;
    height: 421px;
    background: rgba(0, 0, 0, .3);
}

.subnav ul li{
    height: 45px;
    line-height: 45px;
    padding: 0 20px;
}

.subnav ul li a{
    color: #fff;
    font-size: 14px;
}

.subnav ul li a span{
    float: right;
}

.subnav ul li a:hover{
    color: #00a4ff;
}

.course {
    float: right;
    width: 230px;
    height: 300px;
    /* 浮动的盒子不会有外边距合并的问题 */
    margin-top: 50px;
    background-color: #fff;
}

.course h2{
    height: 48px;
    line-height: 48px;
    font-size: 18px;
    text-align: center;
    background-color: #9bceea;
    color: #ffffff;
}

.bd{
    padding:0 20px;
}

.bd ul li{
    padding:14px 0;
    border-bottom:1px solid #efefef;
}

.bd ul li h4{
    font-size: 16px;
    color: #4e4e4e;
}

.bd ul li h4 span{
    font-size: 14px;
}

.bd ul li p{
    font-size: 12px;
    color: #a5a5a5;
}

.bd .more{
    display: block;
    text-align: center;
    height: 38px;
    line-height: 38px;
    font-size: 16px;
    font-weight: 700;
    color: #00a4ff;
    border:1px solid #00a4ff;
    margin-top: 5px;
}

/* 精品推荐区域 */
.goods{
    height: 60px;
    /* 行高会继承给3个子元素,不用给.goods下面的h3、ul li、.mod分别设置行高,行高会被继承,这里将行高写在父元素,子元素都会被继承 */
    line-height: 60px;
    background-color: #fff;
    box-shadow: 0px 2px 3px 3px rgba(0, 0, 0, .1);
    margin-top: 8px;
}

.goods h3{
    float: left;
    font-size: 16px;
    margin-left: 30px;
}

.goods h3 a{
    color: #00a4ff;
}

.goods ul{
    float: left;
    margin-left: 30px;
}

.goods ul li{
    float: left;
}

.goods ul li a{
    padding: 0 30px;
    font-size: 16px;
    color: #050505;
    border-left: 1px solid #ccc;
}

.goods .mod{
    float:right;
    margin-right: 30px;
    font-size: 14px;
    color: #00a4ff;
}

/* 精品推荐列表区域 */
.box{
    margin-top: 30px;
}


.box .box-hd{
    height: 45px;
}

.list-title {
    float: left;
    font-size: 20px;
    font-weight: 500;
    color: #494949;
}

.viewall {
    float:right;
    font-size: 12px;
    color: #a5a5a5;
    margin-top: 10px;
    margin-right: 30px;
}

/* 小 li 外边距的问题，这里有个小技巧：给 box-hd 宽度为 1215 就可以一行装开 5 个 li */
/* 把li 的父亲ul 修改的足够宽一行能装开5个盒子,反正ul的宽度看不见.也可以将box-bd宽度设置为1215效果一样 */
.box-bd ul{
    width: 1215px;
}

.box-bd ul li{
    /* 子绝父相 */
    position: relative;
    width: 228px;
    height: 270px;
    background-color: #fff;
    float: left;
    margin-right: 15px;
    margin-bottom: 15px;
}

.box-bd ul li > img{
    width: 100%;
}

.corner{
    position:absolute;
    top: 4px;
    right: -4px;
}

.item-title{
    margin: 20px 20px 20px 25px;
    font-size: 14px;
    color: #050505;
    font-weight: normal;
}

.item-info {
    color: #999;
    font-size: 12px;
    margin: 0 20px 0 25px;
}

.item-span {
    color: #ff7c2d;
}


/* 编程入门模块 */
.program{
    height: 435px;
    margin-top: 35px;
}

.program-hd{
    height: 42px;
}

.program-hd ul {
    float: left;
    margin-left: 325px;
}

.program-hd ul li {
    float: left;
    padding:0 35px;
}

.program-hd ul li a{
    font-size: 16px;
    color: #868686;
}

.program-hd ul li a:hover{
    color: #66bcfd;
}

.program-hb{
    height: 393px;
}

.program-hb-left{
    float: left;
    height: 393px;
    width: 228px;
}

.program-hb-left img{
    width: 100%;
    height: 100%;
}

.program-hb-right{
    float: left;
    width: 957px;
    height: 393px;
    margin-left: 15px;
}

.program-hb-r-top{
    height: 100px;
}

.program-hb-right ul{
    height: 270px;
    margin-top: 23px;
}

.program-hb-right ul li{
    float: left;
    width: 227px;
    height: 270px;
    margin-right: 16px;
    background-color: #fff;
}

.last{
    margin-right: 0 !important;
}


/* footer模块 */
.footer{
    margin-top: 40px;
    height: 415px;
    background-color: #fff;
}

.footer .w{
    /* 这里有外边距合并问题,所以这里用padding */
    /* margin-top: 35px; */
    padding-top: 35px;
}

.copyright{
    float: left;
}

.copyright p{
    font-size: 12px;
    color: #666;
    margin: 20px 0 15px 0;
}

.copyright .app{
    display: block;
    width: 118px;
    height: 33px;
    line-height: 33px;
    text-align: center;
    border:1px solid #00a4ff;
    font-size: 16px;
    color: #00a4ff;
}

.links{
    float: right;
    margin-right: 30px;
}

.links dl{
    float: left;
    margin-left: 100px;
}

.links dl dt {
    font-size: 16px;
    color: #333;
    font-weight: 500;
    margin-bottom: 5px;
}

.links dl dd a{
    font-size: 12px;
    color: #333;
}




